﻿using UnityEngine;
using System.Collections;
using System;

public class CombatData : MonoBehaviour {

    public int currentHealth = 200;
    public int maxHealth = 200;
    public float attackRange = 3.0f;
    public int attackPower = 1;

    public float cooldownMilliseconds = 2000;
    private DateTime lastAttack = DateTime.Now;

    public float sweep = 30.0f; // The arc that I can reach, in degrees

	// Use this for initialization
	void Start () {
        lastAttack = DateTime.Now.AddMilliseconds(-cooldownMilliseconds * 10);
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    public bool CanAttack()
    {
        if (DateTime.Now >= lastAttack.AddMilliseconds(cooldownMilliseconds)) return true;
        return false;
    }

    public void Attack()
    {
        print("Combat attack");
        lastAttack = DateTime.Now;
    }
}
